package com.ydd.context;

import org.springframework.util.DigestUtils;

public class BaseContext {

    public static ThreadLocal<String> threadLocal = new ThreadLocal<>();
    public static ThreadLocal<Integer> UserthreadLocal = new ThreadLocal<>();

    public static void setCurrentId(String id) {
        threadLocal.set(id);
    }
    public static void setUserCurrentId(Integer id) {
        UserthreadLocal.set(id);
    }

    public static String getCurrentId() { return threadLocal.get();
    }
    public static Integer getUserCurrentId() { return UserthreadLocal.get();
    }
    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
